#ifndef _COMMON_H_
#define _COMMON_H_

#include "Defines.h"

bool GetRefPixelArray( int x, int y, unsigned char * ref_pixel_array, unsigned char * frame, int width, int height );
unsigned char ComputeInterpolationPixel( unsigned char * ref_pixel_array, char * coff_array );
bool PatternIntToArray( unsigned int pattern, char * pattern_array );
unsigned int PatternArrayToInt( char * pattern_array );
bool BinarizeRefPixelArray( char * pattern_array, unsigned char * ref_pixel_array );
unsigned int GetPatternBit( unsigned int pattern, int i );
bool CheckAreaFlat( unsigned char * ref_pixel_array );

extern const int REF_PIXEL_MAP_MATRIX[REF_PIXEL_NUMBER][2];

#endif // _COMMON_H_
